<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sp" uri="http://www.springframework.org/tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>角色-权限</title>
<link rel="stylesheet" type="text/css" href="/style/reset.css" />
<link rel="stylesheet" type="text/css" href="/style/admin.css" />
<script type="text/javascript" src="/js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/js/ul2tree/ul2tree.0.1.5.js"></script>
<script type="text/javascript" src="/js/json.min.js"></script>
<style type="text/css">
#root_function_add {
	display: block;
	width: 300px;
	text-align: left;
}

#div_tree {
	float: left;
	width: 300px;
}

#function_edit {
	float: left;
	width: 300px;
	height: 400px;
	border: 0px;
}
</style>
</head>
<body>
  <sp:message code="${message.info}" text="" />
  <form action="/admin/role/function.dhtml" method="post">
    <c:out value="${role.name }" />
    <input type="hidden" name="role.id" value="<c:out value="${role.id }" />" /> <br />
    <div id="div_tree"></div>
    <br /> <input type="submit" class="button01" value="修改" />
  </form>

  <script>
	$(document).ready(function(){
		loadMenuTree();
	});
	
	function loadMenuTree(){
		$.ul2tree({
			obj:$("#div_tree"),
			data: <c:out value="${functionJson}" escapeXml="false" />,
			imageRoot :"/js/ul2tree/images/",
			checkBox  :"functionIds",
			isLineImg :true
		});
	}
	
</script>
</body>
</html>